﻿using System;
using System.IO;
using System.Web;

namespace RabbitManage.Action
{
    public partial class ImageDelete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request["id"];
            if (string.IsNullOrEmpty(id)) return;

            string file = HttpContext.Current.Server.MapPath(id);

            if (File.Exists(file))
            {
                File.Delete(file);
            }
            Response.Redirect("~/UI/ImageList.aspx", false);
        }
    }
}